package com.hydl.power.service;

import com.github.pagehelper.PageInfo;
import com.hydl.power.pojo.*;
import com.hydl.power.utils.Resp;
import com.hydl.power.utils.TableUtils;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DeviceService {
    /**
     * 查询设备
     * @param
     * @param
     * @return
     */
    PageInfo<Device> selectDevice(Integer pageNum, Integer pageSize, String projectId);

    /**
     *
     * @param deviceName 设备名称
     * @param powerRoomId 配电房名字
     * @param
     * @return
     */
    int addDevice(String deviceName,String areaId,String projectId,String powerRoomId,String serialNumber,
                  String gatewaySn);

    List<PowerRoom> queryByNavId(String navId);

    int deleteNaviceById(Integer id);

    Device getDeviceById(Integer id);

    /**
     *
     * @param deviceName
     * @param deviceAddress
     * @return
     */
    int updateDeviceById(String deviceName,String deviceAddress,String deviceMessageAddress,String commonalityDdress,String aisle,Integer id,String serialNumber);

    List<Device> selectByRoomId(String roomId);

    Device selectBydeviceId(String deviceId);

    PageInfo<Device> getAllDeviceById(Integer pageNum,Integer pageSize,String areaId,String navId,String powerRoomId, String deviceId);

    PageInfo<Device> queryByCondition(Integer pageNum,Integer pageSize,String cityId,String projectId,String roomId,String gatewaySn,String token);

    Device selectByserialNumber(String serialNumber);

    List<Device> queryDevice(String roomId);

    /*查询所有设备*/
    PageInfo<Device> getAll(Integer pageNum, Integer pageSize);

    Device selectAllBySn(String gatewaySn);

    /*模糊查询*/
    PageInfo<Device> queryDeviceLike(Integer pageNum,Integer pageSize,String text,String token);
    /*查询进线柜*/
    List<Device> queryByDeviceIdLike(String roomId);
    int selectCountByRoomId(String roomId);

    /*用能分类*/
    List<LoopType> queryLoopType(String projectId);

    /*用能年分类*/
    List<LoopType> queryYearLoopType(String projectId,String createTime);

    /*月能年分类*/
    List<LoopType> queryMonthLoopType(String projectId,String createTime);

    List<Device> getDeviceByProjectId(String token);

    List queryFacility();
}
